x86: add a new p2m type - p2m_mmio_write_dm
authorYu Zhang <yu.c.zhang@linux.intel.com>
Wed, 7 Jan 2015 10:26:44 +0000 (11:26 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 7 Jan 2015 10:26:44 +0000 (11:26 +0100)
commitb4986813c59a41189886d1e8da05886455e8ad95
tree466aeefe3ae1fb904527ff9b03f4b2ae78e341d8
parent1c02cce0edfa53190b58fa4a1451f47be4d0f1c4
x86: add a new p2m type - p2m_mmio_write_dm

A new p2m type, p2m_mmio_write_dm, is added to trap and emulate
the write operations on GPU's page tables. Handling of this new
p2m type are similar with existing p2m_ram_ro in most condition
checks, with only difference on final policy of emulation vs. drop.
For p2m_ram_ro types, write operations will not trigger the device
model, and will be discarded later in __hvm_copy(); while for the
p2m_mmio_write_dm type pages, writes will go to the device model
via ioreq-server.

Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Signed-off-by: Wei Ye <wei.ye@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/hvm/hvm.c
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/p2m-pt.c
xen/arch/x86/mm/shadow/multi.c
xen/include/asm-x86/p2m.h
xen/include/public/hvm/hvm_op.h